package chap4.Task;
import java.util.Scanner;
public class Task9 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int i = 100;
        int a,b,c;
        System.out.println("所有的3位水仙花数为");
        while (i<=999) {
            a=i%10;
            b=i%100/10;
            c=i/100;
            if(i==a*a*a+b*b*b+c*c*c){
                System.out.println(i);
            }
           i++;
    }
        ;
    }

}
